import React, { useState } from 'react'

export default function App() {
    const [name, setName] = useState("张无忌")
    return (
        <div>
            <button onClick={() => {
                console.log(name)
                setName("周芷若")
            }}>修改</button>
            function-{name}
        </div>
    )
}
